//初始化配备单详情页面
function intConter(){
	    $$("cont3").innerHTML="";
		queryPbdxdById(getStorage("F_PBDBH"),function(tdcArry){
				var tmpl =' <ul class="uc-t ubb ub b-gra t-bla ub-ac lis" >'+
		        '<li class="ub-f1 ut-s " id="">${F_WZMC}</li>'+
				'<li class=" " id="">${F_CKSL_TDC}</li>'+
				'<li class=" umar-r " id="">${F_JLDW}</li>'+
				'<li class="btn uinn5  res17 umh1-7 uinn3 umw1-7 ub-img" ontouchstart="jian(${F_WZID})" id=""></li>'+   
		        '<li class="tx-c   umw33 "><div class="c-wh uinput umh1-7 uinn4" id="c${F_WZID}" >'+
				'<input type="number" class="uc-a1 tx-c " onclick="checknum(this)"  onChange="wenben(this)" id="${F_WZID}" value="${F_DY_TDC}">'+
				'<input type="text" class="uc-a1 tx-c uhide" id="yin${F_WZID}" value="${F_DY_TDC}"></div></li>'+
		        '<li class="btn uinn5  res18 umh1-7 uinn3  umw1-7 ub-img" ontouchstart="jia(${F_WZID})" id=""></li></ul>';
				var d = document.createElement('DIV');
			  	d.innerHTML=zy_tmpl(tmpl, tdcArry, zy_tmpl_count(tdcArry));
				$$('cont3').appendChild(d);
				tdcArry=null;
//		  		loadingEnd();
		})
}
			 //数量相加
		function jia(id){
			$$(id).value=parseFloat($$(id).value)+1;
			if($$("yin"+id).value!=parseFloat($$(id).value)){
				$$("c"+id).className="c-red uinput umh1-7 uinn4";
			}else{
				$$("c"+id).className="c-wh uinput umh1-7 uinn4";
			}
		}		
		//数量相减	
		function jian(id){
			if (parseFloat($$(id).value) == 0) {
			   loadingStart("已经是最小值!", 300);
			}
			else {
				$$(id).value = parseFloat($$(id).value) - 1;
			}
			if($$("yin"+id).value!=parseFloat($$(id).value)){
				$$("c"+id).className="c-red uinput umh1-7 uinn4";
			}else{
				$$("c"+id).className="c-wh uinput umh1-7 uinn4";
			}
		}	
		
		
		//文本输入框判断值是否改变class属性
		function wenben(obj){
			$$("c"+obj.id).className="c-red uinput umh1-7 uinn4";
		}
       function checknum(obj){
	   	this.select();
	   	if (obj.value.length == 0) {
			obj.value=0;
		}
		else if (obj.value.length == 1) {
				obj.value = obj.value.replace(/[^1-9]/g, '');
					if (obj.value.length == 0) {
			         obj.value=0;
		      }
		}
		else {
				obj.value = obj.value.replace(/\D/g, '');
				obj.value = obj.value.replace(/\b(0+)/gi,"");
					if (obj.value.length == 0) {
			       obj.value=0;
		        }
			};
			
			if($$("yin"+obj.id).value!=obj.value){
				$$("c"+obj.id).className="c-red uinput umh1-7 uinn4";
			}else{
				$$("c"+obj.id).className="c-wh uinput umh1-7 uinn4";
			}
			
	   }
